package com.qinglian.controller;

import com.qinglian.entity.Like;
import com.qinglian.service.ILikeListService;
import com.qinglian.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author augn
 * @since 2023-04-29
 */
@RestController
@CrossOrigin
@RequestMapping("/likeList")
public class LikeListController {

    @Autowired
    private ILikeListService service;

    @PostMapping("/addLike")
    public Result<?> addLike(@RequestBody Like like){
        return service.addLike(like);
    }

    @GetMapping("/delLike")
    public Result<?> delLike(@RequestParam Integer findId,@RequestParam Integer userId){
        return service.delLike(findId,userId);
    }
}
